package com.zsy.controller;

import com.zsy.entity.InvoiceManagement;
import com.zsy.service.IFinanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/finance")
public class FinanceController {
    @Autowired
    private IFinanceService ifs;

    // 查询发票信息
    @GetMapping("/selectInvoice")
    public Object selectInvoice(){
        return ifs.selectInvoice();
    }

    // 删除发票信息
    @PostMapping("/deleteInvoice")
    public Object deleteInvoice(int id){
        return ifs.deleteInvoice(id);
    }

    // 新增发票信息
    @PostMapping("/addInvoice")
    public Object addInvoice(InvoiceManagement im){
        return ifs.insertInvoice(im);
    }
}
